|
|
ingo <ing### [at] tagpovrayorg> wrote:
>
> ...it appears that .hf = (Red + Green/255)*0.996093 not the same as .gray
> as I thought.
>
> http://wiki.povray.org/content/Documentation:Tutorial_Section_3.2
> #Noise_and_pigment_functions
> The only appearence of .hf I could find,
Thomas wrote:
> .hf is typically used in height_field functions like, e.g.:
> height_field {function HF_res, HF_res {F_HF_01(x,y,z).hf}}
I knew I had seen .hf *somewhere* but didn't know where to look. Thanks, Ingo.
But it comes as a fascinating surprise (to me) that .gray and .hf use different
color-to-grayscale formulas...
.gray to get the gray value of the color vector:
gray value = Red*29.7% + Green*58.9% + Blue*11.4%
.hf to get the height_field value of the color vector:
hf value = (Red + Green/255)*0.996093
I don't think I've ever actually used .hf (in either a height_field OR a
function)-- but I'm mostly curious as to why they are different. And/or the
historical significance of the .hf formula. AFAIU, the .gray formula is the de
facto standard in POV-Ray for internal color conversions; but is there something
'special' about height_field/FUNCTION use that requires a different formula?
Post a reply to this message
|
|